<template>
  <div>
    你好
    <el-dialog
      title="选择用户"
      :visible.sync="dialogVisible"
      width="30%">
     <el-button @click="developmentEntry(1332)" type="primary">汪雪飚（财务）</el-button>
     <el-button @click="developmentEntry(1692)" type="primary">张天师（集团）</el-button>
     <el-button @click="developmentEntry(860993)" type="primary">客服人员</el-button>

    </el-dialog>
  </div>
</template>

<script>
import axios from 'axios'
export default {
  data() {
    return {
      dialogVisible:false
    };
  },
  mounted() {
    // alert(123);
    this.getCookies();
  },
  methods: {
    developmentEntry(mes){
      // 1332 汪雪飚
      // 1692 张天师
      var url = 'http://192.168.0.151:9005/login/lemon?userCenterId='+ mes;
      axios.get(url).then(res=>{
        console.log(res);
        var mes =  res.data
        var w = mes.indexOf('?');
        var r = mes.substring(w+1,mes.length);
        window.sessionStorage.setItem("sessionId", r);
        this.$router.push({ path: "/Pay" });
      })
    },
    getCookies() {
      let a = window.location.search;
      a = a.substr(1, a.length);
      window.sessionStorage.setItem("sessionId", a);
      console.log(window.sessionStorage.sessionId);

      // this.$store.commit("changeIsHome");
      this.$router.push({ path: "/Pay" });

    }
  }
};
</script>

<style>
</style>
